<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Rotaract DLSU</title>
        <meta http-equiv="Content-Type" content="text/html"/>
        <meta name="robots" content="index,follow"/>
        <meta name="distribution" content="global"/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
        <div id="container2">
            <div id="main2">
                <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="main_nav">
                            <div id="main_text2"> 
                                <center>
                                    <h2>Delete an Agenda</h2>
                                    <?
                                    include 'getAnnounceList.php';
                                    ?>
                                 
                                    <form name="fordelete" action="RAC-deleteAgendaUI.php" method="POST">
                                    <table id="agendaTable" border ="1" cellpadding="10" class="myTable">
                                        <tr style="border-top: solid black">
                                            <td><b>Select</b></td>
                                            <td><b>Date of Agenda</b></td>
                                            <td><b>Place of Agenda</b></td>
                                            <td><b>Description</b></td>
                                            <td><b>Start Time</b></td>
                                            <td><b>End Time</b></td>
                                        </tr>
                                        <br/>
                                        <br/>
                                        <?
                                        while ($row = mysql_fetch_array($result)) {
                                        $idAgenda = $row['id'];
                                        $dateAgenda = $row['date'];
                                        $placeAgenda = $row['place'];
                                        $descAgenda = $row['desc'];
                                        $sTimeAgenda = $row['sTimeAgenda'];
                                        $eTimeAgenda = $row['eTimeAgenda'];

                                        echo ' <tr>';
                                        echo "     <td><input type='checkbox' name='idAgenda' value='$idAgenda'/></td>";
                                        echo '     <td>' . $dateAgenda . '</td>';
                                        echo '     <td>' . $placeAgenda . '</td>';
                                        echo '     <td>' . $descAgenda . '</td>';
                                        echo '     <td>' . $sTimeAgenda . '</td>';
                                        echo '     <td>' . $eTimeAgenda . '</td>';
                                        echo '</tr>';
                                        }
                                        
                                        ?>
                                        
                                    </table>
                                        <input type="submit" name="submit" value="Delete"/>
                                    </form>
                                <?php
                                $confirm = '';
                                if (isset($_POST['submitDelete'])){
                                include 'RAC-deleteAgenda.php';
                                
                                if($confirm){
                                    echo "<h4>Delete Successful! Please refresh to see changes.</h4>";
                                }
                                }
                                ?>
                                                <br/>
                                                <br/>
<!--                                                <form action="deleteAgenda.php" method="POST">
                                                    <h6>Enter the ID of the Agenda that you would want to delete.</h6>
                                                    <input type="text" name="deleteAgenda"/>
                                                    <input type="submit" name="submit" value="Delete"/>
                                                </form>-->
                                                </center>
                                                </div>
                                                </td>

                                            </tr>
                                    </table>
                
                
                
                
                
                            </div>
                            </div>
                            </body>
                            </html>
